<!DOCTYPE html>
<html lang="zh">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<meta name="keywords" content="dromara.org" />
	<meta name="description" content="dromara.org" />
	<!-- 网页标签标题 -->
	<title>dromara(Open source organization)</title>
	<link rel="shortcut icon" href="/website/img/docsite.ico"/>
	<link rel="stylesheet" href="/website/build/documentation.css" />
</head>
<body>
	<div id="root"><div class="documentation-page" data-reactroot=""><header class="header-container header-container-normal"><div class="header-body"><a href="/website/en-us/index.html"><img class="logo" src="/website/img/dromara.png"/></a><div class="search search-normal"><span class="icon-search"></span></div><span class="language-switch language-switch-normal">中</span><div class="header-menu"><img class="header-menu-toggle" src="/website/img/system/menu_gray.png"/><ul><li class="menu-item menu-item-normal"><a href="/website/en-us/index.html" target="_self">Home</a><div class="sub-menu"><ul></ul></div></li><li class="menu-item menu-item-normal menu-item-normal-active"><a href="#">Document</a><div class="sub-menu"><ul><li><a href="/website/en-us/docs/soul/soul.html" target="_self">Soul</a></li><li><a href="/website/en-us/docs/hmily/index.html" target="_self">Hmily</a></li></ul></div></li><li class="menu-item menu-item-normal"><a href="/website/en-us/blog/index.html" target="_self">Blog</a><div class="sub-menu"><ul></ul></div></li><li class="menu-item menu-item-normal"><a href="/website/en-us/community/index.html" target="_self">Community</a><div class="sub-menu"><ul></ul></div></li></ul></div></div></header><section class="content-section"><div class="sidemenu" id="menu"><div class="sidemenu-toggle"><img src="https://img.alicdn.com/tfs/TB1E6apXHGYBuNjy0FoXXciBFXa-200-200.png"/></div><ul><li class="menu-item menu-item-level-1"><span>Soul</span><ul><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/en-us/docs/soul/soul.html" target="_self">Home  </a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/en-us/docs/soul/team.html" target="_self">Team</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/en-us/docs/soul/db.html" target="_self">Database Design</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/en-us/docs/soul/config.html" target="_self">Config</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/en-us/docs/soul/dataSync.html" target="_self">DataSync</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/en-us/docs/soul/metaData.html" target="_self">MetaData</a></li><li style="height:612px;overflow:hidden" class="menu-item menu-item-level-2"><span>User Document<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/setup.html" target="_self">Set up</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/user-http.html" target="_self">Http proxy</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/user-dubbo.html" target="_self">Dubbo proxy</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/user-springcloud.html" target="_self">Spring cloud proxy</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/selector.html" target="_self">Selector and Rule</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/user-dataSync.html" target="_self">Use data sync</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-divide.html" target="_self">Divide Plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-dubbo.html" target="_self">Dubbo plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-springcloud.html" target="_self">Spring cloud plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-rateLimiter.html" target="_self">RateLimiter plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-hystrix.html" target="_self">Hystrix plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-monitor.html" target="_self">Monitor plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-waf.html" target="_self">Waf plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-sign.html" target="_self">Sign plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-rewrite.html" target="_self">Rewrite plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/plugin-websocket.html" target="_self">Websocket plugin</a></li></ul></li><li style="height:360px;overflow:hidden" class="menu-item menu-item-level-2"><span>Developer Guide<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-filter.html" target="_self">Custom filter </a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-plugin.html" target="_self">Custom plugin</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-file.html" target="_self">File and Image</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-iphost.html" target="_self">Custom parsing IP and Host</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-result.html" target="_self">Custom result</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-sign.html" target="_self">Custom sign algorithm</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-client.html" target="_self">Developer soul client</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-thread.html" target="_self">Thread</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/dev-netty.html" target="_self">Soul optimize</a></li></ul></li><li style="height:144px;overflow:hidden" class="menu-item menu-item-level-2"><span>Community<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/contributor.html" target="_self">Contributor</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/committer.html" target="_self">Committer</a></li><li class="menu-item menu-item-level-3"><a href="/website/en-us/docs/soul/code-conduct.html" target="_self">Code conduct</a></li></ul></li></ul></li></ul></div><div class="doc-content markdown-body" id="doc-body"><h2>Development Guidelines</h2>
<ul>
<li><strong>Intentions</strong> Write codes with heart. Pursue clean, simplified and extremely elegant codes.</li>
<li><strong>Readable</strong> The code is unambiguous, and the intention of the code is revealed through reading rather than debugging.</li>
<li><strong>Tidy</strong> Agree with concepts in &lt;Refactoring: Improving the Design of Existing Code&gt; and <Clean Code: A Handbook of Agile Software Craftsmanship>.</li>
<li><strong>Consistent</strong> Be familiar with codes already had, to keep consistent with the style and use.</li>
<li><strong>Simplified</strong> Express meaning with the least code. Highly reusable, no duplicated codes or configurations. Delete codes out of use in time.</li>
<li><strong>Abstract</strong> The levels are clearly divided and the concepts are reasonably refined. Keep methods, classes, packages and modules at the same abstract level.</li>
</ul>
<h2>Contributor Covenant Submitting of Conduct</h2>
<ul>
<li>Make sure all the test cases are passed, Make sure <code>./mvnw clean install</code> can be compiled and tested successfully.</li>
<li>Make sure the test coverage rate is not lower than the master branch.</li>
<li>Make sure to check codes with Checkstyle. codes that violate check rules should have special reasons. Find checkstyle template from <code>https://github.com/dromara/hmily/blob/master/script/hmily_checkstyle.xml</code>, please use checkstyle 8.8 to run the rules.</li>
<li>Careful consideration for each pull request; Small and frequent pull request with complete unit function is welcomed.</li>
<li>Conform to Contributor Covenant Code of Conduct below.</li>
</ul>
<h2>Contributor Covenant Code of Conduct</h2>
<ul>
<li>Use linux line separators.</li>
<li>Keep indents (including blank lines) consistent with the previous one.</li>
<li>Keep one blank line after class definition.</li>
<li>No meaningless blank lines. Please extract private methods to instead of blank lines if too long method body or different logic code fragments.</li>
<li>Use meaningful class, method and variable names, avoid to use abbreviate.</li>
<li>Return values are named with <code>result</code>; Variables in the loop structure are named with each; Replace each with entry in map.</li>
<li>Name property files with <code>Spinal Case</code>(a variant of <code>Snake Case</code> which uses hyphens <code>-</code> to separate words).</li>
<li>Split codes that need to add notes with it into small methods, which are explained with method names.</li>
<li>Have constants on the left and variable on the right in <code>==</code> and <code>equals</code> conditional expressions; Have variable on the left and constants on the right in <code>greater than</code> and <code>less than</code> conditional expressions.</li>
<li>Beside using same names as input parameters and global fields in assign statement, avoid using <code>this</code> modifier.</li>
<li>Design class as final class except abstract class for extend.</li>
<li>Make nested loop structures a new method.</li>
<li>The order of definition of member variables and the order of parameter passing are kept consistent in each class and method.</li>
<li>Order of members definition and parameters should be consistent during classes and methods.</li>
<li>Use guard clauses in priority.</li>
<li>Minimize the access permission for classes and methods.</li>
<li>Private method should be just next to the method in which it is used; writing private methods should be in the same as the appearance order of private methods.</li>
<li>No null parameters or return values.</li>
<li>Replace <code>if</code> <code>else</code> return and assign statement with ternary operator in priority.</li>
<li>Use <code>LinkedList</code> in priority. Use <code>ArrayList</code> for use index to get element only.</li>
<li>Use capacity based Collection such as <code>ArrayList</code>, <code>HashMap</code> must indicate initial capacity to avoid recalculate capacity.</li>
<li>Use English in all the logs and javadoc.</li>
<li>Include Javadoc, todo and fixme only in the comments.</li>
<li>Only public classes and methods need javadoc, other methods, classes and override methods do not need javadoc.</li>
</ul>
</div></section><footer class="footer-container"><div class="footer-body"><img src="/website/img/dromara.png"/><div class="cols-container"><div class="col col-12"><h3>Disclaimer</h3><p>Any unit or individual reprint all relevant information of this website, please indicate the source.</p></div><div class="col col-6"><dl><dt>Document</dt><dd><a href="/website/en-us/docs/soul/soul.html" target="_self">Overview </a></dd><dd><a href="/website/en-us/docs/soul/soul.html" target="_self">Stat up</a></dd><dd><a href="/website/en-us/docs/soul/soul.html" target="_self">Developer Guide</a></dd></dl></div><div class="col col-6"><dl><dt>Resource</dt><dd><a href="/website/en-us/blog/index.html" target="_self">Blog</a></dd><dd><a href="/website/en-us/community/index.html" target="_self">Community</a></dd></dl></div></div><div class="copyright"><span>Copyright ©2020 xiaoyu@apache.org by xiaoyu</span></div></div></footer></div></div>
	<script src="https://f.alicdn.com/react/15.4.1/react-with-addons.min.js"></script>
	<script src="https://f.alicdn.com/react/15.4.1/react-dom.min.js"></script>
	<script>
		window.rootPath = '/website';
  </script>
	<script src="/website/build/documentation.js"></script>
</body>
</html>